﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Formula_Edit.aspx.cs" Inherits="ReportTemplate_Formula_Edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" href="../css/css.css" type="text/css" />

    <script language="javascript" type="text/javascript">
        function Save() {
            window.returnValue = document.getElementById("txtFormula").value;
            window.close();
        }
        function setInfo(id) {
            form1.txtFormula.value += id;
        }
    </script>

</head>
<body style="background-image: url('../images/hit_bg.gif');">
    <form id="form1" runat="server">
    <table style="text-align: center">
        <tr>
            <td rowspan="2">
                <iframe src="Formula_Tree.aspx" style="width: 250px; height: 400px"></iframe>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="327AC6">
                    <tr style="background-color: #F9F9FB; height: 25;">
                        <td align="right">
                            &nbsp;<textarea id="txtFormula" cols="80" rows="23" runat="server"></textarea>
                        </td>
                    </tr>
                    <tr style="background-color: #F9F9FB; height: 25;">
                        <td>
                            <input id="btnadd" class="button01" type="button" value="+" onclick="setInfo(this.value)" />
                            <input id="btnsub" class="button01" type="button" value="-" onclick="setInfo(this.value)" />
                            <input id="btnmlp" class="button01" type="button" value="*" onclick="setInfo(this.value)" />
                            <input id="btndiv" class="button01" type="button" value="/" onclick="setInfo(this.value)" />
                            <input id="btnsum" class="button02" type="button" value="SUM()" onclick="setInfo(this.value)" />
                            <input id="btnavg" class="button02" type="button" value="AVG()" onclick="setInfo(this.value)" />
                            <input id="btnsig" class="button02" type="button" value="SIG()" onclick="setInfo(this.value)" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td align="center">
                <input id="btnSave" type="button" class="botton02" value="确定" onclick="Save();" />&nbsp;&nbsp;
                <input id="btnCancel" type="button" class="botton02" value="取消" onclick="javascript:window.close();" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
